Skip to content

Build menu select and input payloads in one jq call - #19877

Merged
dhh merged 1 commit into
quattrofrom
faster-menu-select
Nov 23, 2026
Merged

dhh merged 1 commit into
quattrofrom
faster-menu-select

Conversation

@dhh

@dhh dhh commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

What changes

Replaces the three separate perl -MEncode -MJSON::PP processes in bin/omarchy-menu-select and the perl process in bin/omarchy-menu-input with a single jq invocation each.

Every interactive picker and text prompt (omarchy-menu-tmux-keybindings, omarchy-menu-herdr-keybindings, omarchy-reminder -i, omarchy-menu-plugin, omarchy-menu-timezone, omarchy-transcode, and the remove pickers) was paying ~120ms just to spawn Perl three times and serialize a single JSON payload (and ~40ms for omarchy-menu-input). Using jq drops that serialization to ~8ms while preserving UTF-8 handling, dash-prefixed options, tabs, --multiple/--selected/--on-change/--change-key, and optional integer dimensions.

Verification

  • bash test/shell.d/menu-test.sh — passed, including new assertions exercising omarchy-menu-select (UTF-8, tabs, dash-prefixed options, --multiple, --selected, --on-change, --change-key, --width, --maxheight, and minimal defaults) and omarchy-menu-input.
  • bash test/shell.d/menu-plugin-test.sh — passed.
  • Benchmarked 100-option omarchy-menu-select invocation against a stub omarchy-shell: dropped from ~150ms+ to ~30ms end-to-end (~120ms saved per open).

Screenshots

No visible change: only CLI JSON payload serialization changed; the shell menu renders identically.

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Replaces Perl payload builders with one jq call in each menu helper.

  • Selection menus build their full request in one jq call.
  • Text prompts build their request with one jq call.

Reviews (1) · Last reviewed commit: "Build menu select and input payloads in ..." · Reviewed by Greptile

@omarchybot omarchybot added the enhancement New feature or request label Nov 23, 2026
@dhh
dhh merged commit 4d0418c into quattro Nov 23, 2026
3 checks passed
@dhh
dhh deleted the faster-menu-select branch November 23, 2026 08:52
@emirb emirb added this to the 4.6.0 milestone Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants